<%@ page language="java" import="java.util.*,java.text.*,other.*" pageEncoding="utf-8"%>
<%
   List UrgeListRows=(List)session.getAttribute("UrgeListRows");
   String UrgeBeginTime=(String)session.getAttribute("UrgeBeginTime");
   String UrgeEndTime=(String)session.getAttribute("UrgeEndTime");
   String UrgeCustomercode=(String)session.getAttribute("UrgeCustomercode");
   String UrgeType=(String)session.getAttribute("UrgeType");
   String UrgeStrSQL=(String)session.getAttribute("UrgeStrSQL");
   GetYToday T=new GetYToday();
   SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 
   SimpleDateFormat sdft=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");      
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <iframe name="summaryfrm"  scrolling="no" frameborder="0" style="position: absolute; top: 0px; left: 0px; display: none; border: #909eff 1px solid;"></iframe>
	<head>
		<title>催收记录查询</title>
		<link rel="stylesheet" type="text/css" media="all" href="skins/aqua/theme.css" />
		<link type="text/css" rel="stylesheet" href="JSDate/skin/WdatePicker.css" />
        <script type="text/javascript" src="JS/calendar.js"></script>
        <script type="text/javascript" src="JS/calendar-en.js"></script>
		<script type="text/javascript" src="JS/calendar-setup.js"></script>
		<script type="text/javascript" src="JSDate/WdatePicker.js"></script>
		<script type="text/javascript">
		    var inputObj = null;
			var targetObj = null;
			var dragObj = null;
			var mouseOffset = null;
			var isHidden=null;			
			document.onclick=closeItemSelect; 
			function closeItemSelect(evt)
			{
				var _obj = document.getElementById("summaryfrm");
				if(isHidden == "block"){
					isHidden = "none";
				}else{
					_obj.style.display = "none";
				}	
			}
			Number.prototype.NaN0 = function() {
			   return isNaN(this) ? 0 : this;
			};	
			function getPosition(e) {
			    var left = 0;
			    var top = 0;
			    while(e.offsetParent){         
			         left =left+e.offsetLeft + (e.currentStyle ? (parseInt(e.currentStyle.borderLeftWidth)).NaN0() : 0);         
			         top=top+e.offsetTop + (e.currentStyle ? (parseInt(e.currentStyle.borderTopWidth)).NaN0() : 0);
			         e = e.offsetParent;
			    }
			    left = left+e.offsetLeft + (e.currentStyle ? (parseInt(e.currentStyle.borderLeftWidth)).NaN0() : 0);
			    top =top+e.offsetTop + (e.currentStyle ? (parseInt(e.currentStyle.borderTopWidth)).NaN0() : 0);
			    return {x:left, y:top};
			}					
		   	function selectCustomer(e,flag){			    
			    document.frames["summaryfrm"].document.body.innerText=" ";
				switchtype=flag;
				isHidden = "block";
				var _target = getPosition(e);
			    var _obj = document.getElementById("summaryfrm");
			    _obj.style.left = _target.x;
			    _obj.style.top = _target.y + e.clientHeight;
			    _obj.style.height="430px";
			    _obj.style.width="700px";
			    _obj.style.zIndex = 5000;
			    _obj.style.display = "block";
				var strUrl = "";	
			    strUrl = "CustomerQuery.jsp";
			    document.summaryfrm.location.href = strUrl;
			}
			function setCustomerName(customername,customercode){
			   frmurgequery.customercode.value=customercode; 
			   hiddenFrm();
			}
			function hiddenFrm(){
			  document.getElementById("summaryfrm").style.display = "none";	
			}	
			function ExportData(){
			   window.location.href="ExPortUrgeData.jsp";	
			}		
		</script>						
    </head>
  <body>
    <div align="center"><h2>催收记录查询</h2></div>
    <div align="center">
	   <form action="UrgeQueryAction.jsp" method="post" name="frmurgequery">
	    <table border="1" width="100%">
	       <tr>
	         <td width="75">开始时间:</td>
	         <%if ((UrgeBeginTime!=null) && (!UrgeBeginTime.equals(""))) {%>
                   <td width="60"><input type="text"  name="begintime" id="begintime" value="<%=UrgeBeginTime%>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="cursor:hand"></input></td>
             <% } else { %>
                   <td width="60"><input type="text"  name="begintime" id="begintime" value="<%=T.getCDate()%>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="cursor:hand"></input></td> 
             <%}%>  
	         <td width="75">结束时间:</td>
	         <%if ((UrgeEndTime!=null) && (!UrgeBeginTime.equals(""))) {%>
                   <td width="60"><input type="text"  name="endtime" id="endtime" value="<%=UrgeEndTime%>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="cursor:hand"></input></td>
             <% } else { %>
                   <td width="60"><input type="text"  name="endtime" id="endtime" value="<%=T.getCDate()%>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="cursor:hand"></input></td> 
             <%}%>	         	         
	         <td width="75" align="center">催收对象:</td>
             <%if ((UrgeCustomercode!=null) && (!UrgeCustomercode.equals(""))){%>
			       <td width="70" align="center"><input name="customercode" id="customercode" type="text" onclick="selectCustomer(this,1);" style="width: 70px;cursor:hand" value="<%=UrgeCustomercode%>"></input></td> 
             <%} else {%>
			       <td width="70" align="center"><input name="customercode" id="customercode" type="text" onclick="selectCustomer(this,1);" style="width: 70px;cursor:hand" value=""></input></td>
             <%}%>
			 <td width="75">文件类型:</td>
			 <%if (UrgeType.equals("day")){%>
				   <td width="50">
					  <select name="filetype" id="filetype">
					     <option selected="selected" value="day">日</option>
					     <option value="month">月</option>
					  </select> 		 
				   </td>
			 <%} else {%>
				   <td width="50">
					  <select name="filetype" id="filetype">
					     <option value="day">日</option>
					     <option selected="selected" value="month">月</option>
					  </select> 		 
				   </td>			 
			 <%}%>
			 <td width="60" align="center">
				<input type="submit" name="query" id="query" value="查   询"></input>
			 </td>
			 <td width="60" align="center">
				<input type="button" name="export" id="export" onclick="ExportData();" value="导   出" style="cursor:hand"></input>
			 </td>
	       </tr>
	    </table>	        
	   </form>
    </div>
    <div align="center">
	    <table border="1" width="950">
		   <tr>
		      <td width="100" align="center">催收时间</td>
		      <td width="100" align="center">问题发生时间</td>
		      <td width="100" align="center">催收对象代码</td>
		      <td width="150" align="center">催收对象名称</td>
		      <td width="150" align="center">催收问题</td>
		      <td width="100" align="center">催收结果</td>
		      <td width="250" align="center">催收结果内容记录</td>
		   </tr>
		   <% if((UrgeListRows!=null) || (UrgeListRows.size()==0)){                
		         for(int k=0;k<UrgeListRows.size();k++){
		             String s=UrgeListRows.get(k).toString();
		             s=s.replace("]","");
		             s=s.replace("[","");
		             String[] m=s.trim().split(",");                                 	     	           
		   %> 
		   <tr>
		       <% if (m[0]!=null) { %>
		          <td width="100" align="center"><%=(String)m[0].trim()%></td>           
		       <%} else {%>  
		          <td width="100" align="center"></td>
		       <%}%>
		       <% if (m[1]!=null) { %>
		          <td width="100" align="center"><%=(String)m[1].trim()%></td>           
		       <%} else {%>  
		          <td width="100" align="center"></td>
		       <%}%>               
		       <% if (m[2]!=null) { %>
		          <td width="100" align="center"><%=(String)m[2].trim()%></td>           
		       <%} else {%>  
		          <td width="100" align="center"></td>
		       <%}%>         
		       <% if (m[3]!=null) { %>
		          <td width="150" align="center"><%=(String)m[3].trim()%></td>           
		       <%} else {%>  
		          <td width="150" align="center"></td>
		       <%}%>         
		        <% if (m[4]!=null) { %>
		          <td width="150" align="center"><%=(String)m[4].trim()%></td>           
		       <%} else {%>  
		          <td width="150" align="center"></td>
		       <%}%>        
		        <% if (m[5]!=null) { %>
		          <td width="100" align="center"><%=(String)m[5].trim()%></td>           
		       <%} else {%>  
		          <td width="100" align="center"></td>
		       <%}%>        
		        <% if (m[6]!=null) { %>
		          <td width="250" align="center"><%=(String)m[6].trim()%></td>           
		       <%} else {%>  
		          <td width="250" align="center"></td>
		       <%}%>      		   
		   </tr>
		   <%}} %>   
	    </table>
    </div>
  </body>
</html>





































